//   Copyright 2012,2013 Vaughn Vernon
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

package com.saasovation.agilepm.domain.model.team;

import java.util.Collection;

import com.saasovation.agilepm.domain.model.tenant.TenantId;

public interface TeamMemberRepository {
    /**
     * 租户的所有团队成员清单
     * @param aTenantId                         租户ID
     * @return                                  返回集合
     */
    public Collection<TeamMember> allTeamMembersOfTenant(TenantId aTenantId);
    /**
     * 移除（团队成员）
     * @param aTeamMember                       团队成员
     */
    public void remove(TeamMember aTeamMember);
    /**
     * 移除所有（团队成员）
     * @param aTeamMemberCollection             团队成员清单
     */
    public void removeAll(Collection<TeamMember> aTeamMemberCollection);
    /**
     * 保存（团队成员）
     * @param aTeamMember                       团队成员
     */
    public void save(TeamMember aTeamMember);
    /**
     * 保存所有（团队成员清单）
     * @param aTeamMemberCollection             团队成员清单
     */
    public void saveAll(Collection<TeamMember> aTeamMemberCollection);

    /**
     * 获取ID的团队成员
     * @param aTenantId                         租户ID
     * @param aUsername                         用户名
     * @return                                  返回团队成员
     */
    public TeamMember teamMemberOfIdentity(TenantId aTenantId, String aUsername);
}
